/*******************************************************************************
 * $Header$
 * $Revision$
 * $Date$
 *
 *==============================================================================
 *
 * Copyright (c) 2001-2006 Primeton Technologies, Ltd.
 * All rights reserved.
 * 
 * Created on 2010-5-11
 *******************************************************************************/

package org.ayound.skin.editor.ui;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

public class ImageSize extends JPanel {
	private BufferedImage image;

	public ImageSize() {
		super();
	}


	public BufferedImage getImage() {
		return image;
	}


	public void setImage(BufferedImage image) {
		this.image = image;
		repaint();
	}


	public void paint(Graphics g) {
		if(image!=null){
			g.clearRect(0, 0, image.getWidth(), image.getHeight());
			g.drawImage(image, 0, 0, null);
			g.dispose();
		}
	}

}